/**
 * Copyright (c) 2011-2014, homeant (homeanter@163.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package xin.homeant.upms.app.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import xin.homeant.cache.annotation.Cache;
import xin.homeant.cache.annotation.ExCache;
import xin.homeant.cache.type.CacheOpType;
import xin.homeant.upms.app.service.IUserService;
import xin.homeant.upms.common.constants.UpmsConstants;
import xin.homeant.upms.rpc.api.UpmsUserService;

/**
 * <P>
 * 用户业务相关
 * </P>
 * 
 * @author homeant homeanter@163.com
 * @Data 2017年5月31日 上午2:28:10
 */
@Service
public class UserServiceImpl implements IUserService{
	
	@Autowired
	private UpmsUserService upmsUserService;
	
	@Override
	@Cache(expire = -1, key = "'"+UpmsConstants.UPMS_SERVER_SESSION+"'",opType=CacheOpType.READ_ONLY,hfield="#args")
	public String getServerSessionId(String sessionId) {
		return null;
	}

	@Override
	@Cache(expire=1000,key="'"+UpmsConstants.UPMS_SERVER_SESSION+"'",opType=CacheOpType.WRITE,hfield="#args[0]",exCache={
			@ExCache(expire = 1000, key = "'"+UpmsConstants.UPMS_SERVER_CODE+"'",cacheObject="#args[0]",hfield="#args[1]")})
	public String addServerTicket(String sessionId, String code) {
		return code;
	}

}
